<template>
    <div class="banner">
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="(item, index) of list" :key="index">
                <img :src="item.img" alt="" />
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script lang="ts">
import { defineComponent, PropType } from "vue";

export default defineComponent({
    props: ["list"]
});
</script>

<style lang="scss" scoped>
.banner {
    height: 150px;
    .my-swipe {
        height: 100%;
        .van-swipe-item {
            color: #fff;
            font-size: 20px;
            line-height: 150px;
            text-align: center;
            background-color: #39a9ed;
            img {
                width: 100%;
                height: 100%;
            }
        }
    }
}
</style>
